Skip to content

Fixes #5401 - Move non-UICatalog examples to gui-cs/Examples and restore AOT validation via Tests#5402

Merged
tig merged 8 commits into
developfrom
copilot/move-examples-to-gui-cs-examples
May 26, 2026
Merged

Fixes #5401 - Move non-UICatalog examples to gui-cs/Examples and restore AOT validation via Tests#5402
tig merged 8 commits into
developfrom
copilot/move-examples-to-gui-cs-examples

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 25, 2026

Fixes

This PR completes the repository split by removing all in-repo examples except UICatalog and ScenarioRunner, updates references to gui-cs/Examples, and preserves thorough AOT validation in the main repo by refactoring the old AOT example into a test app under Tests/.

Proposed Changes/Todos

  • Example inventory split

    • Removed all Examples/* projects/assets except:
      • Examples/UICatalog
      • Examples/ScenarioRunner
    • Updated Examples/README.md to reflect the new ownership boundary.
  • Build/solution alignment

    • Removed non-retained example projects from Terminal.sln.
    • Removed stale example solution items (Examples/Config/*, Examples/PowershellExample.ps1).
    • Removed PromptExample project dependency from docfx/scripts/OutputView/OutputView.csproj.
  • AOT validation refactor into Tests

    • Added new in-repo AOT smoke app:
      • Tests/NativeAotSmoke/NativeAotSmoke.csproj
      • Tests/NativeAotSmoke/Program.cs
    • Added Tests/NativeAotSmoke to Terminal.sln.
    • Refactored CI build validation to publish and execute:
      • NativeAotSmoke --smoke-test
    • Restored thorough AOT validation in the main repo without depending on removed example projects.
  • Docs/reference updates

    • Replaced references to removed local examples across root/docs/agent guidance files with:
      • retained in-repo examples (UICatalog, ScenarioRunner)
      • external examples repo (https://github.com/gui-cs/Examples)
    • Updated AOT documentation/workflow references to point to Tests/NativeAotSmoke.

Pull Request checklist:

  • I've named my PR in the form of "Fixes #issue. Terse description."
  • My code follows the style guidelines of Terminal.Gui - if you use Visual Studio, hit CTRL-K-D to automatically reformat your files before committing.
  • My code follows the Terminal.Gui library design guidelines
  • I ran dotnet test before commit
  • I have made corresponding changes to the API documentation (using /// style comments)
  • My changes generate no new warnings
  • I have checked my code and corrected any poor grammar or misspellings
  • I conducted basic QA to assure all features are working

Copilot AI assigned Copilot and tig May 25, 2026
Copilot AI linked an issue May 25, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Move all examples except UI catalog to gui-cs/Examples Move non-UICatalog examples to gui-cs/Examples May 25, 2026
Copilot finished work on behalf of tig May 25, 2026 01:23
Copilot AI requested a review from tig May 25, 2026 01:23
@tig
Copy link
Copy Markdown
Member

tig commented May 25, 2026

@copilot The aot examples need to be refactored into test apps in the /tests directory. There still needs to be thorough aot validation in the main repo.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 25, 2026

@copilot The aot examples need to be refactored into test apps in the /tests directory. There still needs to be thorough aot validation in the main repo.

Implemented in 295aa26. I refactored the AOT coverage into a new in-repo test app at Tests/NativeAotSmoke and updated build validation to publish it with AOT and run --smoke-test on Linux/Windows, so thorough AOT validation remains in the main repo.

Copilot AI changed the title Move non-UICatalog examples to gui-cs/Examples Move non-UICatalog examples to gui-cs/Examples and restore AOT validation via Tests May 25, 2026
Copilot finished work on behalf of tig May 25, 2026 02:09
@tig tig marked this pull request as ready for review May 25, 2026 02:38
@tig tig requested a review from Copilot May 25, 2026 03:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Completes the in-repo examples split (retaining only UICatalog and ScenarioRunner), updates documentation/solution references to point at gui-cs/Examples, and restores NativeAOT/trimming validation by introducing a dedicated CI smoke app under Tests/.

Changes:

  • Removed non-retained example projects/assets from Examples/ and Terminal.sln, updating docs to reference gui-cs/Examples.
  • Added Tests/NativeAotSmoke AOT publish + runtime smoke validation and wired it into CI.
  • Updated docfx and contributor/agent guidance to reflect new example locations and AOT validation path.

Reviewed changes

Copilot reviewed 82 out of 83 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Tests/README.md Documented the new NativeAotSmoke test app under Tests.
Tests/NativeAotSmoke/Program.cs Implements the AOT smoke app that runs a short full app lifecycle in CI mode.
Tests/NativeAotSmoke/NativeAotSmoke.csproj Adds NativeAOT-enabled executable project and links minimal UICatalog editor helpers.
Terminal.sln Removes moved example projects and adds Tests/NativeAotSmoke.
README.md Updates examples link text to reflect the new examples split.
Examples/README.md Clarifies only UICatalog and ScenarioRunner remain; others moved to gui-cs/Examples.
Examples/WideCharRepro/WideCharRepro.csproj Removed (moved out of repo).
Examples/WideCharRepro/README.md Removed (moved out of repo).
Examples/WideCharRepro/Program.cs Removed (moved out of repo).
Examples/WideCharRepro/BUG_REPORT_TEMPLATE.md Removed (moved out of repo).
Examples/Themes/code-dark.config.json Removed (moved out of repo).
Examples/ShortcutTest/ShortcutTest.csproj Removed (moved out of repo).
Examples/ShortcutTest/ShortcutTest.cs Removed (moved out of repo).
Examples/SelfContained/SelfContained.csproj Removed (moved out of repo; AOT validation replaced by test app).
Examples/SelfContained/README.md Removed (moved out of repo).
Examples/SelfContained/Properties/PublishProfiles/FolderProfile_net8.0_win-x64_Release.pubxml Removed (moved out of repo).
Examples/SelfContained/Properties/PublishProfiles/FolderProfile_net8.0_win-x64_Debug.pubxml Removed (moved out of repo).
Examples/SelfContained/Properties/PublishProfiles/FolderProfile_net8.0_osx-x64_Release.pubxml Removed (moved out of repo).
Examples/SelfContained/Properties/PublishProfiles/FolderProfile_net8.0_osx-x64_Debug.pubxml Removed (moved out of repo).
Examples/SelfContained/Properties/PublishProfiles/FolderProfile_net8.0_linux-x64_Release.pubxml Removed (moved out of repo).
Examples/SelfContained/Properties/PublishProfiles/FolderProfile_net8.0_linux-x64_Debug.pubxml Removed (moved out of repo).
Examples/SelfContained/Program.cs Removed (moved out of repo).
Examples/ReactiveExample/ViewExtensions.cs Removed (moved out of repo).
Examples/ReactiveExample/TerminalScheduler.cs Removed (moved out of repo).
Examples/ReactiveExample/README.md Removed (moved out of repo).
Examples/ReactiveExample/ReactiveExample.csproj Removed (moved out of repo).
Examples/ReactiveExample/Program.cs Removed (moved out of repo).
Examples/ReactiveExample/LoginViewModel.cs Removed (moved out of repo).
Examples/ReactiveExample/LoginView.cs Removed (moved out of repo).
Examples/PromptExample/PromptExample.csproj Removed (moved out of repo).
Examples/PromptExample/Program.cs Removed (moved out of repo).
Examples/PowershellExample.ps1 Removed (moved out of repo).
Examples/NativeAot/README.md Removed (replaced by Tests/NativeAotSmoke in-repo validation).
Examples/NativeAot/Publish_osx-x64_Release.sh Removed (moved out of repo).
Examples/NativeAot/Publish_osx-x64_Debug.sh Removed (moved out of repo).
Examples/NativeAot/Publish_linux-x64_Release.sh Removed (moved out of repo).
Examples/NativeAot/Publish_linux-x64_Debug.sh Removed (moved out of repo).
Examples/NativeAot/Properties/PublishProfiles/FolderProfile_net8.0_win-x64_Release.pubxml Removed (moved out of repo).
Examples/NativeAot/Properties/PublishProfiles/FolderProfile_net8.0_win-x64_Debug.pubxml Removed (moved out of repo).
Examples/NativeAot/Properties/launchSettings.json Removed (moved out of repo).
Examples/InlineSelect/Program.cs Removed (moved out of repo).
Examples/InlineSelect/InlineSelect.csproj Removed (moved out of repo).
Examples/InlineColorPicker/Program.cs Removed (moved out of repo).
Examples/InlineColorPicker/InlineColorPicker.csproj Removed (moved out of repo).
Examples/InlineCLI/README.md Removed (moved out of repo).
Examples/InlineCLI/InlineCLI.csproj Removed (moved out of repo).
Examples/InlineCLI/InlineCLI.cs Removed (moved out of repo).
Examples/FSharpExample/Program.fs Removed (moved out of repo).
Examples/FSharpExample/FSharpExample.sln Removed (moved out of repo).
Examples/FSharpExample/FSharpExample.fsproj Removed (moved out of repo).
Examples/FSharpExample/.editorconfig Removed (moved out of repo).
Examples/FluentExample/Program.cs Removed (moved out of repo).
Examples/FluentExample/FluentExample.csproj Removed (moved out of repo).
Examples/Example/README.md Removed (replaced by inline doc snippet).
Examples/Example/Example.csproj Removed (moved out of repo).
Examples/Example/Example.cs Removed (replaced by inline doc snippet).
Examples/DatePicker.ps1 Removed (moved out of repo).
Examples/Config/windows.json Removed (moved out of repo).
Examples/Config/README.md Removed (moved out of repo).
Examples/Config/macos.json Removed (moved out of repo).
Examples/Config/example_config.json Removed (moved out of repo).
Examples/CommunityToolkitExample/README.md Removed (moved out of repo).
Examples/CommunityToolkitExample/Program.cs Removed (moved out of repo).
Examples/CommunityToolkitExample/Message.cs Removed (moved out of repo).
Examples/CommunityToolkitExample/LoginViewModel.cs Removed (moved out of repo).
Examples/CommunityToolkitExample/LoginView.Designer.cs Removed (moved out of repo).
Examples/CommunityToolkitExample/LoginView.cs Removed (moved out of repo).
Examples/CommunityToolkitExample/LoginActions.cs Removed (moved out of repo).
Examples/CommunityToolkitExample/CommunityToolkitExample.csproj Removed (moved out of repo).
docfx/scripts/OutputView/OutputView.csproj Drops dependency on removed PromptExample project.
docfx/docs/newinv2.md Updates AOT example reference to Tests/NativeAotSmoke.
docfx/docs/getting-started.md Replaces deleted example include with an inline minimal app snippet; updates run instructions.
docfx/docs/config.md Repoints theme-config example reference to gui-cs/Examples.
docfx/docs/application.md Consolidates inline-mode examples reference to gui-cs/Examples.
CONTRIBUTING.md Removes stale example restore guidance; updates repo structure + tests/examples bullets.
ai-v2-primer.md Updates “Working examples” pointers to retained apps and external examples repo.
AGENTS.md Updates example pointers for agent guidance.
.windsurfrules Updates example pointers to match new repo split.
.github/workflows/README.md Updates CI documentation to reflect NativeAotSmoke publish/run validation.
.github/workflows/build-validation.yml Replaces example-based AOT build/publish with Tests/NativeAotSmoke publish + run.
.cursorrules Updates example pointers to match new repo split.
.claude/workflows/build-test-workflow.md Updates AOT validation troubleshooting instructions to use NativeAotSmoke.
.claude/tasks/build-app.md Updates examples list to remove moved example projects and point to external repo.
Files not reviewed (1)
  • Examples/CommunityToolkitExample/LoginView.Designer.cs: Language not supported
Comments suppressed due to low confidence (2)

Tests/NativeAotSmoke/Program.cs:54

  • Console.WriteLine is executed while the IApplication is still in scope (and not yet disposed). Terminal.Gui typically leaves the terminal in an altered state until Dispose, so writing to stdout here can be hidden in the alternate buffer or corrupt terminal state/CI logs. Move the success output to after the using IApplication app = ... scope (or dispose before writing).
    Tests/NativeAotSmoke/NativeAotSmoke.csproj:9
  • This project is intended to validate trimming/AOT safety in CI, but globally suppressing ILLink/AOT analyzer warnings (IL2026/IL3050/IL2123/IL3057) can hide new regressions and reduce the value of the smoke validation. Prefer fixing the underlying warnings or suppressing narrowly at specific call sites with justification, keeping the rest of the warnings visible to CI.

@tig tig changed the title Move non-UICatalog examples to gui-cs/Examples and restore AOT validation via Tests Fixes #5401 - Move non-UICatalog examples to gui-cs/Examples and restore AOT validation via Tests May 25, 2026
…les-to-gui-cs-examples

# Conflicts:
#	Terminal.sln
@tig
Copy link
Copy Markdown
Member

tig commented May 25, 2026

@BDisp @tznind @harder @YourRobotOverlord etc...

This is a controversial change. It adds friction to maintainers who use the examples in development/testing. But it simplifies the repo and makes examples more discoverable to users and agents.

UICatalog and all the Scenarios remain in the repo as they are essential to testing.

Thots?

@BDisp
Copy link
Copy Markdown
Collaborator

BDisp commented May 25, 2026

It would be useful if the example projects referenced the Terminal.Gui project instead of referencing the NuGet package, so that any incompatibility due to changes in Terminal.Gui could be immediately detected. I believe the project reference will be used.

@tznind
Copy link
Copy Markdown
Collaborator

tznind commented May 25, 2026

I only ever really used uicatalog anyway so fine by me

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tig
Copy link
Copy Markdown
Member

tig commented May 25, 2026

It would be useful if the example projects referenced the Terminal.Gui project instead of referencing the NuGet package, so that any incompatibility due to changes in Terminal.Gui could be immediately detected. I believe the project reference will be used.

this work for you @BDisp: e4c7b91

@BDisp
Copy link
Copy Markdown
Collaborator

BDisp commented May 25, 2026

this work for you @BDisp: e4c7b91

Perfectly. Very clever solution.

@YourRobotOverlord
Copy link
Copy Markdown
Collaborator

UICatalog is very complete, and it is also the only one I really use, so I'm in favor of simplifying the library.

…les-to-gui-cs-examples

# Conflicts:
#	Examples/WideCharRepro/Program.cs
#	Terminal.sln
#	docfx/docs/getting-started.md
…examples' into copilot/move-examples-to-gui-cs-examples

# Conflicts:
#	Terminal.sln
@tig tig force-pushed the copilot/move-examples-to-gui-cs-examples branch from 5ea4fb4 to 55f47b5 Compare May 26, 2026 12:13
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move all examples except ui catalog to gui-cs/Examples

6 participants